-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revamp the end-of-test summary #4089
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
Co-authored-by: oleiade <[email protected]>
58138ac
to
126a188
Compare
…6 into new-end-of-test-summary-output
1904999
to
4bb8f7a
Compare
4bb8f7a
to
9c1ed70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a pass on that, but need a couple of more for sure, commenting just signaling that I'm on it
Sure, thanks! Take your time! |
} | ||
|
||
// NewSummary instantiates a new empty Summary. | ||
func NewSummary() *Summary { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of the curiosity, why have we decided to use the empty summary constructor? I mean, why don't we ask require the mandatory values throw the constructor (and maybe even apply validation)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I have a concrete answer, to be honest. I think the reason why I followed this approach is because it's mostly a DTO, and concretely a recursive one, so it felt easier to initialize it empty, like when you initialize a map
, and populate it on the go, instead of asking for the inner data in the constructor.
Most of the logic is on the summary.Output
side, but I preferred not to couple both, even if that's the main use, at least for now.
Co-authored-by: Oleg Bespalov <[email protected]>
The key difference between Do you have any other suggestion to differentiate among them? To be fully transparent, I don't have a strong opinion here, but I'd advocate to either make any change w'all fully agree, or move forward as-is, to avoid looping in cycles. As far as I know, we offer no guarantee on the text summary format, so it should be fine to iterate it in the near future if needed. The one shipped as part of this PR doesn't need to be the definitive one before and along the v1. |
d2511c3
to
b8ed6e0
Compare
@joanlopez like I said internally, I'm totally fine with processing as it's with one exception that it's worth adjusting texting when it lands documentation
IMO too generic and vague and in my case it was the source of confusion since I expected to see these more valuable results since the beginning |
Nice, thanks for your input @olegbespalov! |
Hey @joanlopez @olegbespalov 👋🏻 Apologies for the delay and being blocking here. I overlooked the compact vs full list of metrics during the last phases of the design, but doing a bit of digging into some of our initial design docs, I found back that we had come up with a candidate list of metrics to exclude in compact mode (and include in full/extended mode):
The rationale there, being that we wanted to only show what is relevant to the vast majority of users in compact mode, and only bring them back when users explicit request the full mode. In general I remember that we discussed focusing on removing things that would only be relevant to a very small portion of users by default, or to very specific use-cases. At the time we outlined only HTTP metrics, because that's where we thought the most of those cases were, but I think we should feel free to expand that list if we can consider other metrics as "not absolutely mandatory". I also agree with @olegbespalov in that we are explicitly excluding the end of test summary from the v1.Y.Z support policy, and we should feel free to iterate on it in the future. So we don't have to block on this if there are diverging ideas about what the list of included/excluded metrics would be for instance: even if we kept the list at what it is now, that would be 👍🏻 for me 🙇🏻 Hope that's helpful, and again, great work @joanlopez I love it ❤️ 🚀 |
Overview
This pull request changes the current end-of-test summary by a new design, with two available formats:
aiming to bring clearer a more valuable results to users. Find a screenshot below.
User-facing details
compact
summary with--with-summary=compact
, or with no argument, as it is the default choice.full
summary with--with-summary=full
.legacy
summary with--with-summary=legacy
.handleSummary
function is now different. So, those users relying on it must migrate their implementation or use--with-summary=legacy
meanwhile.Technical details (for review purposes)
output.Output
namedsummary
.internal/cmd/testdata/summary/...
with different scenarios, groups, thresholds, custom metrics and what not... that can be used for both automated and manual testing. If you think anything is missing, just suggest it.lib.Summary
vslib.LegacySummary
), to keep support for the legacy summary for some time, in an easy way, so things aren't complexity mixed and the the clean up in the future is simpler, just by removing that type, all the references to it, and simplifying the few conditionals that behave depending on which summary type is provided.summary-legacy.js
, for simpler cleanup whenever we remove that support, which I guess might be for v2 (once we ship the formalized JSON output format within v1).Internal Checklist
Before review readiness
lib.Report
as the new API for customhandleSummary
(note this would be a breaking change), or if we want to ship this progressively.js/summary.go
according to that decision.js/summary.js
:summarizeMetrics
andsummarizeMetricsWithThresholds
, or just replace the first with the second one (as we may no longer need the first one if we remove the old summary code).output/summary
package:playground/full-summary
files, or define a proper location for them.--- Ideas left for a second iteration---
General
make lint
) and all checks pass.make tests
) and all tests pass.